-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Azure IMDS Url in InstanceMetadataService initialization #4600
Fix Azure IMDS Url in InstanceMetadataService initialization #4600
Conversation
Welcome @whites11! |
The failing test sounds like a flake to me, or at least I doubt my change introduced it. |
This PR looks good for me. @whites11 I think we have removed IMDS auth in latest CA master - do you see value in bringing that back? |
I totally do. I have a pr in the works to add it back. |
@whites11 let's disable the flaky test before completely fixing it. |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feiskyer, whites11 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thanks for quick review&merge. |
+@MaciekPytel what's our plans for next patch release? is it possible to cut that by request? |
Usually we cut them when requested via sig. Probably the best way to request is by adding an item to sig-meeting agenda. How critical is this fix? We just did patch releases in late December, doing another one right now would be a bit soon. But if it's critical than we can bring it up in today sig meeting and set the cut date for next week (to give other providers some time to get their patches in). |
Hey @MaciekPytel thanks a lot for your answer. Will add an entry to the agenda and see what happens. Thanks again! |
Which component this PR applies to?
cluster-autoscaler
What type of PR is this?
/kind bug
What this PR does / why we need it:
In CA version 1.21, on Azure, it was possible to omit the Subscription ID completely.
On startup, cluster autoscaler used to detect it using Azure Instance Metadata Service (IMDS).
It used to do so using a service in
legacy-cloud-providers
.The initialization code for such service is as follows:
In 1.21 this worked just fine.
In 1.22 the meaning of the metadataURL parameter was changed in the service code.
What used to be a full URL including path in the version used in 1.21
http://169.254.169.254/metadata/instance
was changed to a root path in the version used in 1.22.This change was not picked up in CA code and this causes CA to panic on startup when the Subscription ID is not provided:
Because the computed IMDS URL contains the path twice:
obviously ending up with a 404 from the IMDS endpoint.
This easy PR fixes just that by passing the correct value to the
NewInstanceMetadataService
function.Which issue(s) this PR fixes:
None that I could find.
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: